﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using ZX.HIS.Common;
using ZX.HIS.Model;
using ZX.HIS.BLL;

namespace ZX.HIS.UI.Controllers
{
    public class DiagnoInfoController : Controller
    {
        //
        // GET: /DiagnoInfo/

        public ActionResult Index()
        {
            return View();
        }
        ///// <summary>
        ///// 挂号信息分页查询方法
        ///// </summary>
        ///// <param name="PageIndex"></param>
        ///// <param name="PageSize"></param>
        ///// <returns></returns>
        //public JsonResult FnDiagnoInfoPageList(int PageIndex, int PageSize)
        //{
        //    string StrOrder = "";
        //    if (!String.IsNullOrEmpty(Request["StrOrder"]))
        //    {
        //        StrOrder = Request["StrOrder"];
        //    }
        //    ZX.HIS.Model.DiagnoInfo RIModel = new Model.DiagnoInfo();
        //    RIModel.HospitalId = 1001;
        //    if (!String.IsNullOrEmpty(Request["DiagnoChiName"]))
        //    {
        //        RIModel.DiagnoChiName = Request["DiagnoChiName"];
        //    }
        //    if (!String.IsNullOrEmpty(Request["UserNameOne"]))
        //    {
        //        RIModel.DiagnoChiName = Request["UserNameOne"];
        //    }
        //    ZX.HIS.BLL.DiagnoInfo DNBLL = new BLL.DiagnoInfo();
        //    PageClass<ZX.HIS.Model.DiagnoInfo> PageList = DNBLL.(PageIndex, PageSize, RIModel, StrOrder);
        //    return Json(PageList);
        //}
        /// <summary>
        /// 获得一个实体类
        /// </summary>
        /// <param name="DiagnoId"></param>
        /// <returns></returns>
        public JsonResult FnGetDiagnoInfoModel(int DiagnoId)
        {
            ZX.HIS.BLL.DiagnoInfo DNBLL = new BLL.DiagnoInfo();
            ZX.HIS.Model.DiagnoInfo RIModel = DNBLL.GetDiagnoInfoModel(DiagnoId);
            return Json(RIModel);
        }
        /// <summary>
        /// 诊断信息
        /// </summary>
        /// <returns></returns>
        public JsonResult FnDiagnoInfoList()
        {
            int HospitalId = 0;
            HttpCookie myCookie = Request.Cookies["MyCookie"];
            if (myCookie != null)
            {
                if (!String.IsNullOrEmpty(myCookie["HospitalId"]))
                {
                    HospitalId = Convert.ToInt32(myCookie["HospitalId"]);
                }
            }
            ZX.HIS.BLL.DiagnoInfo RIBLL = new BLL.DiagnoInfo();
            return Json(RIBLL.DiagnoInfoList(HospitalId));
        }
      
        ///// <summary>
        ///// 挂号信息添加
        ///// </summary>
        ///// <returns></returns>
        //public JsonResult FnDiagnoInfoAdd()
        //{
        //    ZX.HIS.Model.DiagnoInfo RIModel = new Model.DiagnoInfo();
        //    ZX.HIS.BLL.DiagnoInfo DNBLL = new BLL.DiagnoInfo();
        //    RIModel.UserIdTwo = 1001;
        //    RIModel.HospitalId = 1001;
        //    RIModel.DiagnoChiName = Request["DiagnoChiName"];
        //    RIModel.DiagnoSex = Convert.ToInt32(Request["DiagnoSex"]);
        //    RIModel.DiagnoAge = Convert.ToInt32(Request["DiagnoAge"]);
        //    RIModel.DepartId = Convert.ToInt32(Request["DepartId"]);
        //    RIModel.UserIdOne = Convert.ToInt32(Request["UserIdOne"]);
        //    RIModel.DiagnoTypeId = Convert.ToInt32(Request["DiagnoTypeId"]);
        //    RIModel.DiagnoNoPrice = Convert.ToDecimal(Request["DiagnoNoPrice"]);
        //    RIModel.DiagnoHasPrice = Convert.ToDecimal(Request["DiagnoHasPrice"]);
        //    RIModel.DiagnoRePrice = Convert.ToDecimal(Request["DiagnoRePrice"]);
        //    return Json(DNBLL.DiagnoInfoAdd(RIModel));
        //}
        ///// <summary>
        ///// 挂号信息修改
        ///// </summary>
        ///// <returns></returns>
        //public JsonResult FnDiagnoInfoUpt()
        //{
        //    ZX.HIS.Model.DiagnoInfo RIModel = new Model.DiagnoInfo();
        //    RIModel.DiagnoChiName = Request["DiagnoChiName"];
        //    RIModel.DiagnoId = Convert.ToInt32(Request["DiagnoId"]);
        //    RIModel.DiagnoSex = Convert.ToInt32(Request["DiagnoSex"]);
        //    RIModel.DiagnoAge = Convert.ToInt32(Request["DiagnoAge"]);
        //    RIModel.DepartId = Convert.ToInt32(Request["DepartId"]);
        //    RIModel.UserIdOne = Convert.ToInt32(Request["UserIdOne"]);
        //    RIModel.DiagnoTypeId = Convert.ToInt32(Request["DiagnoTypeId"]);
        //    RIModel.DiagnoNoPrice = Convert.ToDecimal(Request["DiagnoNoPrice"]);
        //    RIModel.DiagnoHasPrice = Convert.ToDecimal(Request["DiagnoHasPrice"]);
        //    RIModel.DiagnoRePrice = Convert.ToDecimal(Request["DiagnoRePrice"]);
        //    ZX.HIS.BLL.DiagnoInfo DNBLL = new BLL.DiagnoInfo();
        //    return Json(DNBLL.DiagnoInfoUpt(RIModel));
        //}
    }
}
